# -*- coding: utf-8 -*-

from mod.common.mod import Mod
import mod.server.extraServerApi as svrApi
import mod.client.extraClientApi as clntApi

from myDemo import logger
from myDemo.cfg.sys import Ver, ModName, SvrName, SvrPath, ClntName, ClntPath

@Mod.Binding(name = ModName, version = Ver)
class myDemoMod(object):
    def __init__(self):
        logger.critical("===== init main %s =====" % ModName)

    @Mod.InitServer()
    def myDemoModServerInit(self):
        svrApi.RegisterSystem(ModName, SvrName, SvrPath)

    @Mod.DestroyServer()
    def myDemoModServerDestroy(self):
        logger.critical("===== Destroy main %s =====" % SvrName)

    @Mod.InitClient()
    def myDemoModClientInit(self):
        clntApi.RegisterSystem(ModName, ClntName, ClntPath)
    
    @Mod.DestroyClient()
    def myDemoModClientDestroy(self):
        pass
